// $ANTLR 3.3 Nov 30, 2010 12:45:30 D:\\project\\Amuthu\\Amuthu.g 2011-03-21 17:10:44

package org.amuthu.parser;


import org.antlr.runtime.*;
import java.util.Stack;
import java.util.List;
import java.util.ArrayList;


import org.antlr.runtime.tree.*;

public class AmuthuParser extends Parser {
    public static final String[] tokenNames = new String[] {
        "<invalid>", "<EOR>", "<DOWN>", "<UP>", "UNARY_MINUS", "LPAREN", "RPAREN", "QUESTION", "OR", "AND", "EQUALS", "NOT_EQUALS", "LESSTHAN_EQ", "GREATERTHAN_EQ", "LESSTHAN", "GREATERTHAN", "PLUS", "MINUS", "MULTIPLY", "DIVIDE", "MODULO", "POWER", "NOT", "INTEGER", "DOUBLE", "BOOLEAN", "QUOTE", "IDENTIFIER", "COMMA", "ASSIGN", "WHITESPACE", "':'"
    };
    public static final int EOF=-1;
    public static final int T__31=31;
    public static final int UNARY_MINUS=4;
    public static final int LPAREN=5;
    public static final int RPAREN=6;
    public static final int QUESTION=7;
    public static final int OR=8;
    public static final int AND=9;
    public static final int EQUALS=10;
    public static final int NOT_EQUALS=11;
    public static final int LESSTHAN_EQ=12;
    public static final int GREATERTHAN_EQ=13;
    public static final int LESSTHAN=14;
    public static final int GREATERTHAN=15;
    public static final int PLUS=16;
    public static final int MINUS=17;
    public static final int MULTIPLY=18;
    public static final int DIVIDE=19;
    public static final int MODULO=20;
    public static final int POWER=21;
    public static final int NOT=22;
    public static final int INTEGER=23;
    public static final int DOUBLE=24;
    public static final int BOOLEAN=25;
    public static final int QUOTE=26;
    public static final int IDENTIFIER=27;
    public static final int COMMA=28;
    public static final int ASSIGN=29;
    public static final int WHITESPACE=30;

    // delegates
    // delegators


        public AmuthuParser(TokenStream input) {
            this(input, new RecognizerSharedState());
        }
        public AmuthuParser(TokenStream input, RecognizerSharedState state) {
            super(input, state);
             
        }
        
    protected TreeAdaptor adaptor = new CommonTreeAdaptor();

    public void setTreeAdaptor(TreeAdaptor adaptor) {
        this.adaptor = adaptor;
    }
    public TreeAdaptor getTreeAdaptor() {
        return adaptor;
    }

    public String[] getTokenNames() { return AmuthuParser.tokenNames; }
    public String getGrammarFileName() { return "D:\\project\\Amuthu\\Amuthu.g"; }


    public static class expression_return extends ParserRuleReturnScope {
        CommonTree tree;
        public Object getTree() { return tree; }
    };

    // $ANTLR start "expression"
    // D:\\project\\Amuthu\\Amuthu.g:22:1: expression : conditionalExpr ;
    public final AmuthuParser.expression_return expression() throws RecognitionException {
        AmuthuParser.expression_return retval = new AmuthuParser.expression_return();
        retval.start = input.LT(1);

        CommonTree root_0 = null;

        AmuthuParser.conditionalExpr_return conditionalExpr1 = null;



        try {
            // D:\\project\\Amuthu\\Amuthu.g:23:2: ( conditionalExpr )
            // D:\\project\\Amuthu\\Amuthu.g:23:6: conditionalExpr
            {
            root_0 = (CommonTree)adaptor.nil();

            pushFollow(FOLLOW_conditionalExpr_in_expression60);
            conditionalExpr1=conditionalExpr();

            state._fsp--;

            adaptor.addChild(root_0, conditionalExpr1.getTree());

            }

            retval.stop = input.LT(-1);

            retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);
            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
    	retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);

        }
        finally {
        }
        return retval;
    }
    // $ANTLR end "expression"

    public static class parenthesisedExpr_return extends ParserRuleReturnScope {
        CommonTree tree;
        public Object getTree() { return tree; }
    };

    // $ANTLR start "parenthesisedExpr"
    // D:\\project\\Amuthu\\Amuthu.g:26:1: parenthesisedExpr : LPAREN expression RPAREN ;
    public final AmuthuParser.parenthesisedExpr_return parenthesisedExpr() throws RecognitionException {
        AmuthuParser.parenthesisedExpr_return retval = new AmuthuParser.parenthesisedExpr_return();
        retval.start = input.LT(1);

        CommonTree root_0 = null;

        Token LPAREN2=null;
        Token RPAREN4=null;
        AmuthuParser.expression_return expression3 = null;


        CommonTree LPAREN2_tree=null;
        CommonTree RPAREN4_tree=null;

        try {
            // D:\\project\\Amuthu\\Amuthu.g:27:5: ( LPAREN expression RPAREN )
            // D:\\project\\Amuthu\\Amuthu.g:27:9: LPAREN expression RPAREN
            {
            root_0 = (CommonTree)adaptor.nil();

            LPAREN2=(Token)match(input,LPAREN,FOLLOW_LPAREN_in_parenthesisedExpr78); 
            pushFollow(FOLLOW_expression_in_parenthesisedExpr81);
            expression3=expression();

            state._fsp--;

            adaptor.addChild(root_0, expression3.getTree());
            RPAREN4=(Token)match(input,RPAREN,FOLLOW_RPAREN_in_parenthesisedExpr83); 

            }

            retval.stop = input.LT(-1);

            retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);
            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
    	retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);

        }
        finally {
        }
        return retval;
    }
    // $ANTLR end "parenthesisedExpr"

    public static class conditionalExpr_return extends ParserRuleReturnScope {
        CommonTree tree;
        public Object getTree() { return tree; }
    };

    // $ANTLR start "conditionalExpr"
    // D:\\project\\Amuthu\\Amuthu.g:30:1: conditionalExpr : logicalOrExpr ( QUESTION expression ':' conditionalExpr )? ;
    public final AmuthuParser.conditionalExpr_return conditionalExpr() throws RecognitionException {
        AmuthuParser.conditionalExpr_return retval = new AmuthuParser.conditionalExpr_return();
        retval.start = input.LT(1);

        CommonTree root_0 = null;

        Token QUESTION6=null;
        Token char_literal8=null;
        AmuthuParser.logicalOrExpr_return logicalOrExpr5 = null;

        AmuthuParser.expression_return expression7 = null;

        AmuthuParser.conditionalExpr_return conditionalExpr9 = null;


        CommonTree QUESTION6_tree=null;
        CommonTree char_literal8_tree=null;

        try {
            // D:\\project\\Amuthu\\Amuthu.g:31:2: ( logicalOrExpr ( QUESTION expression ':' conditionalExpr )? )
            // D:\\project\\Amuthu\\Amuthu.g:31:4: logicalOrExpr ( QUESTION expression ':' conditionalExpr )?
            {
            root_0 = (CommonTree)adaptor.nil();

            pushFollow(FOLLOW_logicalOrExpr_in_conditionalExpr100);
            logicalOrExpr5=logicalOrExpr();

            state._fsp--;

            adaptor.addChild(root_0, logicalOrExpr5.getTree());
            // D:\\project\\Amuthu\\Amuthu.g:31:18: ( QUESTION expression ':' conditionalExpr )?
            int alt1=2;
            int LA1_0 = input.LA(1);

            if ( (LA1_0==QUESTION) ) {
                alt1=1;
            }
            switch (alt1) {
                case 1 :
                    // D:\\project\\Amuthu\\Amuthu.g:31:19: QUESTION expression ':' conditionalExpr
                    {
                    QUESTION6=(Token)match(input,QUESTION,FOLLOW_QUESTION_in_conditionalExpr103); 
                    QUESTION6_tree = (CommonTree)adaptor.create(QUESTION6);
                    root_0 = (CommonTree)adaptor.becomeRoot(QUESTION6_tree, root_0);

                    pushFollow(FOLLOW_expression_in_conditionalExpr106);
                    expression7=expression();

                    state._fsp--;

                    adaptor.addChild(root_0, expression7.getTree());
                    char_literal8=(Token)match(input,31,FOLLOW_31_in_conditionalExpr108); 
                    pushFollow(FOLLOW_conditionalExpr_in_conditionalExpr111);
                    conditionalExpr9=conditionalExpr();

                    state._fsp--;

                    adaptor.addChild(root_0, conditionalExpr9.getTree());

                    }
                    break;

            }


            }

            retval.stop = input.LT(-1);

            retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);
            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
    	retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);

        }
        finally {
        }
        return retval;
    }
    // $ANTLR end "conditionalExpr"

    public static class logicalOrExpr_return extends ParserRuleReturnScope {
        CommonTree tree;
        public Object getTree() { return tree; }
    };

    // $ANTLR start "logicalOrExpr"
    // D:\\project\\Amuthu\\Amuthu.g:33:1: logicalOrExpr : logicalAndExpr ( OR logicalAndExpr )* ;
    public final AmuthuParser.logicalOrExpr_return logicalOrExpr() throws RecognitionException {
        AmuthuParser.logicalOrExpr_return retval = new AmuthuParser.logicalOrExpr_return();
        retval.start = input.LT(1);

        CommonTree root_0 = null;

        Token OR11=null;
        AmuthuParser.logicalAndExpr_return logicalAndExpr10 = null;

        AmuthuParser.logicalAndExpr_return logicalAndExpr12 = null;


        CommonTree OR11_tree=null;

        try {
            // D:\\project\\Amuthu\\Amuthu.g:34:2: ( logicalAndExpr ( OR logicalAndExpr )* )
            // D:\\project\\Amuthu\\Amuthu.g:34:4: logicalAndExpr ( OR logicalAndExpr )*
            {
            root_0 = (CommonTree)adaptor.nil();

            pushFollow(FOLLOW_logicalAndExpr_in_logicalOrExpr124);
            logicalAndExpr10=logicalAndExpr();

            state._fsp--;

            adaptor.addChild(root_0, logicalAndExpr10.getTree());
            // D:\\project\\Amuthu\\Amuthu.g:34:19: ( OR logicalAndExpr )*
            loop2:
            do {
                int alt2=2;
                int LA2_0 = input.LA(1);

                if ( (LA2_0==OR) ) {
                    alt2=1;
                }


                switch (alt2) {
            	case 1 :
            	    // D:\\project\\Amuthu\\Amuthu.g:34:20: OR logicalAndExpr
            	    {
            	    OR11=(Token)match(input,OR,FOLLOW_OR_in_logicalOrExpr127); 
            	    OR11_tree = (CommonTree)adaptor.create(OR11);
            	    root_0 = (CommonTree)adaptor.becomeRoot(OR11_tree, root_0);

            	    pushFollow(FOLLOW_logicalAndExpr_in_logicalOrExpr130);
            	    logicalAndExpr12=logicalAndExpr();

            	    state._fsp--;

            	    adaptor.addChild(root_0, logicalAndExpr12.getTree());

            	    }
            	    break;

            	default :
            	    break loop2;
                }
            } while (true);


            }

            retval.stop = input.LT(-1);

            retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);
            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
    	retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);

        }
        finally {
        }
        return retval;
    }
    // $ANTLR end "logicalOrExpr"

    public static class logicalAndExpr_return extends ParserRuleReturnScope {
        CommonTree tree;
        public Object getTree() { return tree; }
    };

    // $ANTLR start "logicalAndExpr"
    // D:\\project\\Amuthu\\Amuthu.g:36:1: logicalAndExpr : equalityExpr ( AND equalityExpr )* ;
    public final AmuthuParser.logicalAndExpr_return logicalAndExpr() throws RecognitionException {
        AmuthuParser.logicalAndExpr_return retval = new AmuthuParser.logicalAndExpr_return();
        retval.start = input.LT(1);

        CommonTree root_0 = null;

        Token AND14=null;
        AmuthuParser.equalityExpr_return equalityExpr13 = null;

        AmuthuParser.equalityExpr_return equalityExpr15 = null;


        CommonTree AND14_tree=null;

        try {
            // D:\\project\\Amuthu\\Amuthu.g:37:2: ( equalityExpr ( AND equalityExpr )* )
            // D:\\project\\Amuthu\\Amuthu.g:37:4: equalityExpr ( AND equalityExpr )*
            {
            root_0 = (CommonTree)adaptor.nil();

            pushFollow(FOLLOW_equalityExpr_in_logicalAndExpr142);
            equalityExpr13=equalityExpr();

            state._fsp--;

            adaptor.addChild(root_0, equalityExpr13.getTree());
            // D:\\project\\Amuthu\\Amuthu.g:37:17: ( AND equalityExpr )*
            loop3:
            do {
                int alt3=2;
                int LA3_0 = input.LA(1);

                if ( (LA3_0==AND) ) {
                    alt3=1;
                }


                switch (alt3) {
            	case 1 :
            	    // D:\\project\\Amuthu\\Amuthu.g:37:18: AND equalityExpr
            	    {
            	    AND14=(Token)match(input,AND,FOLLOW_AND_in_logicalAndExpr145); 
            	    AND14_tree = (CommonTree)adaptor.create(AND14);
            	    root_0 = (CommonTree)adaptor.becomeRoot(AND14_tree, root_0);

            	    pushFollow(FOLLOW_equalityExpr_in_logicalAndExpr148);
            	    equalityExpr15=equalityExpr();

            	    state._fsp--;

            	    adaptor.addChild(root_0, equalityExpr15.getTree());

            	    }
            	    break;

            	default :
            	    break loop3;
                }
            } while (true);


            }

            retval.stop = input.LT(-1);

            retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);
            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
    	retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);

        }
        finally {
        }
        return retval;
    }
    // $ANTLR end "logicalAndExpr"

    public static class equalityExpr_return extends ParserRuleReturnScope {
        CommonTree tree;
        public Object getTree() { return tree; }
    };

    // $ANTLR start "equalityExpr"
    // D:\\project\\Amuthu\\Amuthu.g:39:1: equalityExpr : relationalExpr ( ( EQUALS | NOT_EQUALS ) relationalExpr )* ;
    public final AmuthuParser.equalityExpr_return equalityExpr() throws RecognitionException {
        AmuthuParser.equalityExpr_return retval = new AmuthuParser.equalityExpr_return();
        retval.start = input.LT(1);

        CommonTree root_0 = null;

        Token EQUALS17=null;
        Token NOT_EQUALS18=null;
        AmuthuParser.relationalExpr_return relationalExpr16 = null;

        AmuthuParser.relationalExpr_return relationalExpr19 = null;


        CommonTree EQUALS17_tree=null;
        CommonTree NOT_EQUALS18_tree=null;

        try {
            // D:\\project\\Amuthu\\Amuthu.g:40:2: ( relationalExpr ( ( EQUALS | NOT_EQUALS ) relationalExpr )* )
            // D:\\project\\Amuthu\\Amuthu.g:40:4: relationalExpr ( ( EQUALS | NOT_EQUALS ) relationalExpr )*
            {
            root_0 = (CommonTree)adaptor.nil();

            pushFollow(FOLLOW_relationalExpr_in_equalityExpr160);
            relationalExpr16=relationalExpr();

            state._fsp--;

            adaptor.addChild(root_0, relationalExpr16.getTree());
            // D:\\project\\Amuthu\\Amuthu.g:40:19: ( ( EQUALS | NOT_EQUALS ) relationalExpr )*
            loop5:
            do {
                int alt5=2;
                int LA5_0 = input.LA(1);

                if ( ((LA5_0>=EQUALS && LA5_0<=NOT_EQUALS)) ) {
                    alt5=1;
                }


                switch (alt5) {
            	case 1 :
            	    // D:\\project\\Amuthu\\Amuthu.g:40:20: ( EQUALS | NOT_EQUALS ) relationalExpr
            	    {
            	    // D:\\project\\Amuthu\\Amuthu.g:40:20: ( EQUALS | NOT_EQUALS )
            	    int alt4=2;
            	    int LA4_0 = input.LA(1);

            	    if ( (LA4_0==EQUALS) ) {
            	        alt4=1;
            	    }
            	    else if ( (LA4_0==NOT_EQUALS) ) {
            	        alt4=2;
            	    }
            	    else {
            	        NoViableAltException nvae =
            	            new NoViableAltException("", 4, 0, input);

            	        throw nvae;
            	    }
            	    switch (alt4) {
            	        case 1 :
            	            // D:\\project\\Amuthu\\Amuthu.g:40:22: EQUALS
            	            {
            	            EQUALS17=(Token)match(input,EQUALS,FOLLOW_EQUALS_in_equalityExpr165); 
            	            EQUALS17_tree = (CommonTree)adaptor.create(EQUALS17);
            	            root_0 = (CommonTree)adaptor.becomeRoot(EQUALS17_tree, root_0);


            	            }
            	            break;
            	        case 2 :
            	            // D:\\project\\Amuthu\\Amuthu.g:40:32: NOT_EQUALS
            	            {
            	            NOT_EQUALS18=(Token)match(input,NOT_EQUALS,FOLLOW_NOT_EQUALS_in_equalityExpr170); 
            	            NOT_EQUALS18_tree = (CommonTree)adaptor.create(NOT_EQUALS18);
            	            root_0 = (CommonTree)adaptor.becomeRoot(NOT_EQUALS18_tree, root_0);


            	            }
            	            break;

            	    }

            	    pushFollow(FOLLOW_relationalExpr_in_equalityExpr175);
            	    relationalExpr19=relationalExpr();

            	    state._fsp--;

            	    adaptor.addChild(root_0, relationalExpr19.getTree());

            	    }
            	    break;

            	default :
            	    break loop5;
                }
            } while (true);


            }

            retval.stop = input.LT(-1);

            retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);
            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
    	retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);

        }
        finally {
        }
        return retval;
    }
    // $ANTLR end "equalityExpr"

    public static class relationalExpr_return extends ParserRuleReturnScope {
        CommonTree tree;
        public Object getTree() { return tree; }
    };

    // $ANTLR start "relationalExpr"
    // D:\\project\\Amuthu\\Amuthu.g:42:1: relationalExpr : additiveExpr ( ( LESSTHAN_EQ | GREATERTHAN_EQ | LESSTHAN | GREATERTHAN ) additiveExpr )* ;
    public final AmuthuParser.relationalExpr_return relationalExpr() throws RecognitionException {
        AmuthuParser.relationalExpr_return retval = new AmuthuParser.relationalExpr_return();
        retval.start = input.LT(1);

        CommonTree root_0 = null;

        Token LESSTHAN_EQ21=null;
        Token GREATERTHAN_EQ22=null;
        Token LESSTHAN23=null;
        Token GREATERTHAN24=null;
        AmuthuParser.additiveExpr_return additiveExpr20 = null;

        AmuthuParser.additiveExpr_return additiveExpr25 = null;


        CommonTree LESSTHAN_EQ21_tree=null;
        CommonTree GREATERTHAN_EQ22_tree=null;
        CommonTree LESSTHAN23_tree=null;
        CommonTree GREATERTHAN24_tree=null;

        try {
            // D:\\project\\Amuthu\\Amuthu.g:43:5: ( additiveExpr ( ( LESSTHAN_EQ | GREATERTHAN_EQ | LESSTHAN | GREATERTHAN ) additiveExpr )* )
            // D:\\project\\Amuthu\\Amuthu.g:43:9: additiveExpr ( ( LESSTHAN_EQ | GREATERTHAN_EQ | LESSTHAN | GREATERTHAN ) additiveExpr )*
            {
            root_0 = (CommonTree)adaptor.nil();

            pushFollow(FOLLOW_additiveExpr_in_relationalExpr193);
            additiveExpr20=additiveExpr();

            state._fsp--;

            adaptor.addChild(root_0, additiveExpr20.getTree());
            // D:\\project\\Amuthu\\Amuthu.g:44:9: ( ( LESSTHAN_EQ | GREATERTHAN_EQ | LESSTHAN | GREATERTHAN ) additiveExpr )*
            loop7:
            do {
                int alt7=2;
                int LA7_0 = input.LA(1);

                if ( ((LA7_0>=LESSTHAN_EQ && LA7_0<=GREATERTHAN)) ) {
                    alt7=1;
                }


                switch (alt7) {
            	case 1 :
            	    // D:\\project\\Amuthu\\Amuthu.g:44:13: ( LESSTHAN_EQ | GREATERTHAN_EQ | LESSTHAN | GREATERTHAN ) additiveExpr
            	    {
            	    // D:\\project\\Amuthu\\Amuthu.g:44:13: ( LESSTHAN_EQ | GREATERTHAN_EQ | LESSTHAN | GREATERTHAN )
            	    int alt6=4;
            	    switch ( input.LA(1) ) {
            	    case LESSTHAN_EQ:
            	        {
            	        alt6=1;
            	        }
            	        break;
            	    case GREATERTHAN_EQ:
            	        {
            	        alt6=2;
            	        }
            	        break;
            	    case LESSTHAN:
            	        {
            	        alt6=3;
            	        }
            	        break;
            	    case GREATERTHAN:
            	        {
            	        alt6=4;
            	        }
            	        break;
            	    default:
            	        NoViableAltException nvae =
            	            new NoViableAltException("", 6, 0, input);

            	        throw nvae;
            	    }

            	    switch (alt6) {
            	        case 1 :
            	            // D:\\project\\Amuthu\\Amuthu.g:44:17: LESSTHAN_EQ
            	            {
            	            LESSTHAN_EQ21=(Token)match(input,LESSTHAN_EQ,FOLLOW_LESSTHAN_EQ_in_relationalExpr212); 
            	            LESSTHAN_EQ21_tree = (CommonTree)adaptor.create(LESSTHAN_EQ21);
            	            root_0 = (CommonTree)adaptor.becomeRoot(LESSTHAN_EQ21_tree, root_0);


            	            }
            	            break;
            	        case 2 :
            	            // D:\\project\\Amuthu\\Amuthu.g:45:17: GREATERTHAN_EQ
            	            {
            	            GREATERTHAN_EQ22=(Token)match(input,GREATERTHAN_EQ,FOLLOW_GREATERTHAN_EQ_in_relationalExpr231); 
            	            GREATERTHAN_EQ22_tree = (CommonTree)adaptor.create(GREATERTHAN_EQ22);
            	            root_0 = (CommonTree)adaptor.becomeRoot(GREATERTHAN_EQ22_tree, root_0);


            	            }
            	            break;
            	        case 3 :
            	            // D:\\project\\Amuthu\\Amuthu.g:46:17: LESSTHAN
            	            {
            	            LESSTHAN23=(Token)match(input,LESSTHAN,FOLLOW_LESSTHAN_in_relationalExpr250); 
            	            LESSTHAN23_tree = (CommonTree)adaptor.create(LESSTHAN23);
            	            root_0 = (CommonTree)adaptor.becomeRoot(LESSTHAN23_tree, root_0);


            	            }
            	            break;
            	        case 4 :
            	            // D:\\project\\Amuthu\\Amuthu.g:47:17: GREATERTHAN
            	            {
            	            GREATERTHAN24=(Token)match(input,GREATERTHAN,FOLLOW_GREATERTHAN_in_relationalExpr269); 
            	            GREATERTHAN24_tree = (CommonTree)adaptor.create(GREATERTHAN24);
            	            root_0 = (CommonTree)adaptor.becomeRoot(GREATERTHAN24_tree, root_0);


            	            }
            	            break;

            	    }

            	    pushFollow(FOLLOW_additiveExpr_in_relationalExpr298);
            	    additiveExpr25=additiveExpr();

            	    state._fsp--;

            	    adaptor.addChild(root_0, additiveExpr25.getTree());

            	    }
            	    break;

            	default :
            	    break loop7;
                }
            } while (true);


            }

            retval.stop = input.LT(-1);

            retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);
            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
    	retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);

        }
        finally {
        }
        return retval;
    }
    // $ANTLR end "relationalExpr"

    public static class additiveExpr_return extends ParserRuleReturnScope {
        CommonTree tree;
        public Object getTree() { return tree; }
    };

    // $ANTLR start "additiveExpr"
    // D:\\project\\Amuthu\\Amuthu.g:53:1: additiveExpr : multiplicativeExpr ( ( PLUS | MINUS ) multiplicativeExpr )* ;
    public final AmuthuParser.additiveExpr_return additiveExpr() throws RecognitionException {
        AmuthuParser.additiveExpr_return retval = new AmuthuParser.additiveExpr_return();
        retval.start = input.LT(1);

        CommonTree root_0 = null;

        Token PLUS27=null;
        Token MINUS28=null;
        AmuthuParser.multiplicativeExpr_return multiplicativeExpr26 = null;

        AmuthuParser.multiplicativeExpr_return multiplicativeExpr29 = null;


        CommonTree PLUS27_tree=null;
        CommonTree MINUS28_tree=null;

        try {
            // D:\\project\\Amuthu\\Amuthu.g:54:5: ( multiplicativeExpr ( ( PLUS | MINUS ) multiplicativeExpr )* )
            // D:\\project\\Amuthu\\Amuthu.g:54:9: multiplicativeExpr ( ( PLUS | MINUS ) multiplicativeExpr )*
            {
            root_0 = (CommonTree)adaptor.nil();

            pushFollow(FOLLOW_multiplicativeExpr_in_additiveExpr329);
            multiplicativeExpr26=multiplicativeExpr();

            state._fsp--;

            adaptor.addChild(root_0, multiplicativeExpr26.getTree());
            // D:\\project\\Amuthu\\Amuthu.g:55:9: ( ( PLUS | MINUS ) multiplicativeExpr )*
            loop9:
            do {
                int alt9=2;
                int LA9_0 = input.LA(1);

                if ( ((LA9_0>=PLUS && LA9_0<=MINUS)) ) {
                    alt9=1;
                }


                switch (alt9) {
            	case 1 :
            	    // D:\\project\\Amuthu\\Amuthu.g:55:13: ( PLUS | MINUS ) multiplicativeExpr
            	    {
            	    // D:\\project\\Amuthu\\Amuthu.g:55:13: ( PLUS | MINUS )
            	    int alt8=2;
            	    int LA8_0 = input.LA(1);

            	    if ( (LA8_0==PLUS) ) {
            	        alt8=1;
            	    }
            	    else if ( (LA8_0==MINUS) ) {
            	        alt8=2;
            	    }
            	    else {
            	        NoViableAltException nvae =
            	            new NoViableAltException("", 8, 0, input);

            	        throw nvae;
            	    }
            	    switch (alt8) {
            	        case 1 :
            	            // D:\\project\\Amuthu\\Amuthu.g:55:17: PLUS
            	            {
            	            PLUS27=(Token)match(input,PLUS,FOLLOW_PLUS_in_additiveExpr347); 
            	            PLUS27_tree = (CommonTree)adaptor.create(PLUS27);
            	            root_0 = (CommonTree)adaptor.becomeRoot(PLUS27_tree, root_0);


            	            }
            	            break;
            	        case 2 :
            	            // D:\\project\\Amuthu\\Amuthu.g:56:17: MINUS
            	            {
            	            MINUS28=(Token)match(input,MINUS,FOLLOW_MINUS_in_additiveExpr366); 
            	            MINUS28_tree = (CommonTree)adaptor.create(MINUS28);
            	            root_0 = (CommonTree)adaptor.becomeRoot(MINUS28_tree, root_0);


            	            }
            	            break;

            	    }

            	    pushFollow(FOLLOW_multiplicativeExpr_in_additiveExpr395);
            	    multiplicativeExpr29=multiplicativeExpr();

            	    state._fsp--;

            	    adaptor.addChild(root_0, multiplicativeExpr29.getTree());

            	    }
            	    break;

            	default :
            	    break loop9;
                }
            } while (true);


            }

            retval.stop = input.LT(-1);

            retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);
            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
    	retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);

        }
        finally {
        }
        return retval;
    }
    // $ANTLR end "additiveExpr"

    public static class multiplicativeExpr_return extends ParserRuleReturnScope {
        CommonTree tree;
        public Object getTree() { return tree; }
    };

    // $ANTLR start "multiplicativeExpr"
    // D:\\project\\Amuthu\\Amuthu.g:62:1: multiplicativeExpr : powerExpr ( ( MULTIPLY | DIVIDE | MODULO ) powerExpr )* ;
    public final AmuthuParser.multiplicativeExpr_return multiplicativeExpr() throws RecognitionException {
        AmuthuParser.multiplicativeExpr_return retval = new AmuthuParser.multiplicativeExpr_return();
        retval.start = input.LT(1);

        CommonTree root_0 = null;

        Token MULTIPLY31=null;
        Token DIVIDE32=null;
        Token MODULO33=null;
        AmuthuParser.powerExpr_return powerExpr30 = null;

        AmuthuParser.powerExpr_return powerExpr34 = null;


        CommonTree MULTIPLY31_tree=null;
        CommonTree DIVIDE32_tree=null;
        CommonTree MODULO33_tree=null;

        try {
            // D:\\project\\Amuthu\\Amuthu.g:63:5: ( powerExpr ( ( MULTIPLY | DIVIDE | MODULO ) powerExpr )* )
            // D:\\project\\Amuthu\\Amuthu.g:63:9: powerExpr ( ( MULTIPLY | DIVIDE | MODULO ) powerExpr )*
            {
            root_0 = (CommonTree)adaptor.nil();

            pushFollow(FOLLOW_powerExpr_in_multiplicativeExpr425);
            powerExpr30=powerExpr();

            state._fsp--;

            adaptor.addChild(root_0, powerExpr30.getTree());
            // D:\\project\\Amuthu\\Amuthu.g:64:9: ( ( MULTIPLY | DIVIDE | MODULO ) powerExpr )*
            loop11:
            do {
                int alt11=2;
                int LA11_0 = input.LA(1);

                if ( ((LA11_0>=MULTIPLY && LA11_0<=MODULO)) ) {
                    alt11=1;
                }


                switch (alt11) {
            	case 1 :
            	    // D:\\project\\Amuthu\\Amuthu.g:64:13: ( MULTIPLY | DIVIDE | MODULO ) powerExpr
            	    {
            	    // D:\\project\\Amuthu\\Amuthu.g:64:13: ( MULTIPLY | DIVIDE | MODULO )
            	    int alt10=3;
            	    switch ( input.LA(1) ) {
            	    case MULTIPLY:
            	        {
            	        alt10=1;
            	        }
            	        break;
            	    case DIVIDE:
            	        {
            	        alt10=2;
            	        }
            	        break;
            	    case MODULO:
            	        {
            	        alt10=3;
            	        }
            	        break;
            	    default:
            	        NoViableAltException nvae =
            	            new NoViableAltException("", 10, 0, input);

            	        throw nvae;
            	    }

            	    switch (alt10) {
            	        case 1 :
            	            // D:\\project\\Amuthu\\Amuthu.g:64:17: MULTIPLY
            	            {
            	            MULTIPLY31=(Token)match(input,MULTIPLY,FOLLOW_MULTIPLY_in_multiplicativeExpr444); 
            	            MULTIPLY31_tree = (CommonTree)adaptor.create(MULTIPLY31);
            	            root_0 = (CommonTree)adaptor.becomeRoot(MULTIPLY31_tree, root_0);


            	            }
            	            break;
            	        case 2 :
            	            // D:\\project\\Amuthu\\Amuthu.g:65:17: DIVIDE
            	            {
            	            DIVIDE32=(Token)match(input,DIVIDE,FOLLOW_DIVIDE_in_multiplicativeExpr463); 
            	            DIVIDE32_tree = (CommonTree)adaptor.create(DIVIDE32);
            	            root_0 = (CommonTree)adaptor.becomeRoot(DIVIDE32_tree, root_0);


            	            }
            	            break;
            	        case 3 :
            	            // D:\\project\\Amuthu\\Amuthu.g:66:17: MODULO
            	            {
            	            MODULO33=(Token)match(input,MODULO,FOLLOW_MODULO_in_multiplicativeExpr482); 
            	            MODULO33_tree = (CommonTree)adaptor.create(MODULO33);
            	            root_0 = (CommonTree)adaptor.becomeRoot(MODULO33_tree, root_0);


            	            }
            	            break;

            	    }

            	    pushFollow(FOLLOW_powerExpr_in_multiplicativeExpr511);
            	    powerExpr34=powerExpr();

            	    state._fsp--;

            	    adaptor.addChild(root_0, powerExpr34.getTree());

            	    }
            	    break;

            	default :
            	    break loop11;
                }
            } while (true);


            }

            retval.stop = input.LT(-1);

            retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);
            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
    	retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);

        }
        finally {
        }
        return retval;
    }
    // $ANTLR end "multiplicativeExpr"

    public static class powerExpr_return extends ParserRuleReturnScope {
        CommonTree tree;
        public Object getTree() { return tree; }
    };

    // $ANTLR start "powerExpr"
    // D:\\project\\Amuthu\\Amuthu.g:72:1: powerExpr : unaryExpr ( POWER unaryExpr )* ;
    public final AmuthuParser.powerExpr_return powerExpr() throws RecognitionException {
        AmuthuParser.powerExpr_return retval = new AmuthuParser.powerExpr_return();
        retval.start = input.LT(1);

        CommonTree root_0 = null;

        Token POWER36=null;
        AmuthuParser.unaryExpr_return unaryExpr35 = null;

        AmuthuParser.unaryExpr_return unaryExpr37 = null;


        CommonTree POWER36_tree=null;

        try {
            // D:\\project\\Amuthu\\Amuthu.g:73:2: ( unaryExpr ( POWER unaryExpr )* )
            // D:\\project\\Amuthu\\Amuthu.g:73:4: unaryExpr ( POWER unaryExpr )*
            {
            root_0 = (CommonTree)adaptor.nil();

            pushFollow(FOLLOW_unaryExpr_in_powerExpr536);
            unaryExpr35=unaryExpr();

            state._fsp--;

            adaptor.addChild(root_0, unaryExpr35.getTree());
            // D:\\project\\Amuthu\\Amuthu.g:73:14: ( POWER unaryExpr )*
            loop12:
            do {
                int alt12=2;
                int LA12_0 = input.LA(1);

                if ( (LA12_0==POWER) ) {
                    alt12=1;
                }


                switch (alt12) {
            	case 1 :
            	    // D:\\project\\Amuthu\\Amuthu.g:73:16: POWER unaryExpr
            	    {
            	    POWER36=(Token)match(input,POWER,FOLLOW_POWER_in_powerExpr540); 
            	    POWER36_tree = (CommonTree)adaptor.create(POWER36);
            	    root_0 = (CommonTree)adaptor.becomeRoot(POWER36_tree, root_0);

            	    pushFollow(FOLLOW_unaryExpr_in_powerExpr543);
            	    unaryExpr37=unaryExpr();

            	    state._fsp--;

            	    adaptor.addChild(root_0, unaryExpr37.getTree());

            	    }
            	    break;

            	default :
            	    break loop12;
                }
            } while (true);


            }

            retval.stop = input.LT(-1);

            retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);
            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
    	retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);

        }
        finally {
        }
        return retval;
    }
    // $ANTLR end "powerExpr"

    public static class unaryExpr_return extends ParserRuleReturnScope {
        CommonTree tree;
        public Object getTree() { return tree; }
    };

    // $ANTLR start "unaryExpr"
    // D:\\project\\Amuthu\\Amuthu.g:76:1: unaryExpr : ( PLUS unaryExpr -> unaryExpr | MINUS unaryExpr -> ^( UNARY_MINUS unaryExpr ) | NOT unaryExpr -> ^( NOT unaryExpr ) | primaryExpr );
    public final AmuthuParser.unaryExpr_return unaryExpr() throws RecognitionException {
        AmuthuParser.unaryExpr_return retval = new AmuthuParser.unaryExpr_return();
        retval.start = input.LT(1);

        CommonTree root_0 = null;

        Token PLUS38=null;
        Token MINUS40=null;
        Token NOT42=null;
        AmuthuParser.unaryExpr_return unaryExpr39 = null;

        AmuthuParser.unaryExpr_return unaryExpr41 = null;

        AmuthuParser.unaryExpr_return unaryExpr43 = null;

        AmuthuParser.primaryExpr_return primaryExpr44 = null;


        CommonTree PLUS38_tree=null;
        CommonTree MINUS40_tree=null;
        CommonTree NOT42_tree=null;
        RewriteRuleTokenStream stream_PLUS=new RewriteRuleTokenStream(adaptor,"token PLUS");
        RewriteRuleTokenStream stream_NOT=new RewriteRuleTokenStream(adaptor,"token NOT");
        RewriteRuleTokenStream stream_MINUS=new RewriteRuleTokenStream(adaptor,"token MINUS");
        RewriteRuleSubtreeStream stream_unaryExpr=new RewriteRuleSubtreeStream(adaptor,"rule unaryExpr");
        try {
            // D:\\project\\Amuthu\\Amuthu.g:77:5: ( PLUS unaryExpr -> unaryExpr | MINUS unaryExpr -> ^( UNARY_MINUS unaryExpr ) | NOT unaryExpr -> ^( NOT unaryExpr ) | primaryExpr )
            int alt13=4;
            switch ( input.LA(1) ) {
            case PLUS:
                {
                alt13=1;
                }
                break;
            case MINUS:
                {
                alt13=2;
                }
                break;
            case NOT:
                {
                alt13=3;
                }
                break;
            case LPAREN:
            case INTEGER:
            case DOUBLE:
            case BOOLEAN:
            case QUOTE:
            case IDENTIFIER:
                {
                alt13=4;
                }
                break;
            default:
                NoViableAltException nvae =
                    new NoViableAltException("", 13, 0, input);

                throw nvae;
            }

            switch (alt13) {
                case 1 :
                    // D:\\project\\Amuthu\\Amuthu.g:77:9: PLUS unaryExpr
                    {
                    PLUS38=(Token)match(input,PLUS,FOLLOW_PLUS_in_unaryExpr562);  
                    stream_PLUS.add(PLUS38);

                    pushFollow(FOLLOW_unaryExpr_in_unaryExpr564);
                    unaryExpr39=unaryExpr();

                    state._fsp--;

                    stream_unaryExpr.add(unaryExpr39.getTree());


                    // AST REWRITE
                    // elements: unaryExpr
                    // token labels: 
                    // rule labels: retval
                    // token list labels: 
                    // rule list labels: 
                    // wildcard labels: 
                    retval.tree = root_0;
                    RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.tree:null);

                    root_0 = (CommonTree)adaptor.nil();
                    // 77:24: -> unaryExpr
                    {
                        adaptor.addChild(root_0, stream_unaryExpr.nextTree());

                    }

                    retval.tree = root_0;
                    }
                    break;
                case 2 :
                    // D:\\project\\Amuthu\\Amuthu.g:78:9: MINUS unaryExpr
                    {
                    MINUS40=(Token)match(input,MINUS,FOLLOW_MINUS_in_unaryExpr579);  
                    stream_MINUS.add(MINUS40);

                    pushFollow(FOLLOW_unaryExpr_in_unaryExpr581);
                    unaryExpr41=unaryExpr();

                    state._fsp--;

                    stream_unaryExpr.add(unaryExpr41.getTree());


                    // AST REWRITE
                    // elements: unaryExpr
                    // token labels: 
                    // rule labels: retval
                    // token list labels: 
                    // rule list labels: 
                    // wildcard labels: 
                    retval.tree = root_0;
                    RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.tree:null);

                    root_0 = (CommonTree)adaptor.nil();
                    // 78:25: -> ^( UNARY_MINUS unaryExpr )
                    {
                        // D:\\project\\Amuthu\\Amuthu.g:78:28: ^( UNARY_MINUS unaryExpr )
                        {
                        CommonTree root_1 = (CommonTree)adaptor.nil();
                        root_1 = (CommonTree)adaptor.becomeRoot((CommonTree)adaptor.create(UNARY_MINUS, "UNARY_MINUS"), root_1);

                        adaptor.addChild(root_1, stream_unaryExpr.nextTree());

                        adaptor.addChild(root_0, root_1);
                        }

                    }

                    retval.tree = root_0;
                    }
                    break;
                case 3 :
                    // D:\\project\\Amuthu\\Amuthu.g:79:9: NOT unaryExpr
                    {
                    NOT42=(Token)match(input,NOT,FOLLOW_NOT_in_unaryExpr599);  
                    stream_NOT.add(NOT42);

                    pushFollow(FOLLOW_unaryExpr_in_unaryExpr601);
                    unaryExpr43=unaryExpr();

                    state._fsp--;

                    stream_unaryExpr.add(unaryExpr43.getTree());


                    // AST REWRITE
                    // elements: unaryExpr, NOT
                    // token labels: 
                    // rule labels: retval
                    // token list labels: 
                    // rule list labels: 
                    // wildcard labels: 
                    retval.tree = root_0;
                    RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.tree:null);

                    root_0 = (CommonTree)adaptor.nil();
                    // 79:23: -> ^( NOT unaryExpr )
                    {
                        // D:\\project\\Amuthu\\Amuthu.g:79:27: ^( NOT unaryExpr )
                        {
                        CommonTree root_1 = (CommonTree)adaptor.nil();
                        root_1 = (CommonTree)adaptor.becomeRoot(stream_NOT.nextNode(), root_1);

                        adaptor.addChild(root_1, stream_unaryExpr.nextTree());

                        adaptor.addChild(root_0, root_1);
                        }

                    }

                    retval.tree = root_0;
                    }
                    break;
                case 4 :
                    // D:\\project\\Amuthu\\Amuthu.g:80:9: primaryExpr
                    {
                    root_0 = (CommonTree)adaptor.nil();

                    pushFollow(FOLLOW_primaryExpr_in_unaryExpr620);
                    primaryExpr44=primaryExpr();

                    state._fsp--;

                    adaptor.addChild(root_0, primaryExpr44.getTree());

                    }
                    break;

            }
            retval.stop = input.LT(-1);

            retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);
            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
    	retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);

        }
        finally {
        }
        return retval;
    }
    // $ANTLR end "unaryExpr"

    public static class primaryExpr_return extends ParserRuleReturnScope {
        CommonTree tree;
        public Object getTree() { return tree; }
    };

    // $ANTLR start "primaryExpr"
    // D:\\project\\Amuthu\\Amuthu.g:83:1: primaryExpr : ( parenthesisedExpr | literal );
    public final AmuthuParser.primaryExpr_return primaryExpr() throws RecognitionException {
        AmuthuParser.primaryExpr_return retval = new AmuthuParser.primaryExpr_return();
        retval.start = input.LT(1);

        CommonTree root_0 = null;

        AmuthuParser.parenthesisedExpr_return parenthesisedExpr45 = null;

        AmuthuParser.literal_return literal46 = null;



        try {
            // D:\\project\\Amuthu\\Amuthu.g:84:5: ( parenthesisedExpr | literal )
            int alt14=2;
            int LA14_0 = input.LA(1);

            if ( (LA14_0==LPAREN) ) {
                alt14=1;
            }
            else if ( ((LA14_0>=INTEGER && LA14_0<=IDENTIFIER)) ) {
                alt14=2;
            }
            else {
                NoViableAltException nvae =
                    new NoViableAltException("", 14, 0, input);

                throw nvae;
            }
            switch (alt14) {
                case 1 :
                    // D:\\project\\Amuthu\\Amuthu.g:84:9: parenthesisedExpr
                    {
                    root_0 = (CommonTree)adaptor.nil();

                    pushFollow(FOLLOW_parenthesisedExpr_in_primaryExpr639);
                    parenthesisedExpr45=parenthesisedExpr();

                    state._fsp--;

                    adaptor.addChild(root_0, parenthesisedExpr45.getTree());

                    }
                    break;
                case 2 :
                    // D:\\project\\Amuthu\\Amuthu.g:85:9: literal
                    {
                    root_0 = (CommonTree)adaptor.nil();

                    pushFollow(FOLLOW_literal_in_primaryExpr649);
                    literal46=literal();

                    state._fsp--;

                    adaptor.addChild(root_0, literal46.getTree());

                    }
                    break;

            }
            retval.stop = input.LT(-1);

            retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);
            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
    	retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);

        }
        finally {
        }
        return retval;
    }
    // $ANTLR end "primaryExpr"

    public static class literal_return extends ParserRuleReturnScope {
        CommonTree tree;
        public Object getTree() { return tree; }
    };

    // $ANTLR start "literal"
    // D:\\project\\Amuthu\\Amuthu.g:88:1: literal : ( INTEGER | DOUBLE | BOOLEAN | QUOTE | function );
    public final AmuthuParser.literal_return literal() throws RecognitionException {
        AmuthuParser.literal_return retval = new AmuthuParser.literal_return();
        retval.start = input.LT(1);

        CommonTree root_0 = null;

        Token INTEGER47=null;
        Token DOUBLE48=null;
        Token BOOLEAN49=null;
        Token QUOTE50=null;
        AmuthuParser.function_return function51 = null;


        CommonTree INTEGER47_tree=null;
        CommonTree DOUBLE48_tree=null;
        CommonTree BOOLEAN49_tree=null;
        CommonTree QUOTE50_tree=null;

        try {
            // D:\\project\\Amuthu\\Amuthu.g:89:5: ( INTEGER | DOUBLE | BOOLEAN | QUOTE | function )
            int alt15=5;
            switch ( input.LA(1) ) {
            case INTEGER:
                {
                alt15=1;
                }
                break;
            case DOUBLE:
                {
                alt15=2;
                }
                break;
            case BOOLEAN:
                {
                alt15=3;
                }
                break;
            case QUOTE:
                {
                alt15=4;
                }
                break;
            case IDENTIFIER:
                {
                alt15=5;
                }
                break;
            default:
                NoViableAltException nvae =
                    new NoViableAltException("", 15, 0, input);

                throw nvae;
            }

            switch (alt15) {
                case 1 :
                    // D:\\project\\Amuthu\\Amuthu.g:89:9: INTEGER
                    {
                    root_0 = (CommonTree)adaptor.nil();

                    INTEGER47=(Token)match(input,INTEGER,FOLLOW_INTEGER_in_literal673); 
                    INTEGER47_tree = (CommonTree)adaptor.create(INTEGER47);
                    adaptor.addChild(root_0, INTEGER47_tree);


                    }
                    break;
                case 2 :
                    // D:\\project\\Amuthu\\Amuthu.g:90:9: DOUBLE
                    {
                    root_0 = (CommonTree)adaptor.nil();

                    DOUBLE48=(Token)match(input,DOUBLE,FOLLOW_DOUBLE_in_literal683); 
                    DOUBLE48_tree = (CommonTree)adaptor.create(DOUBLE48);
                    adaptor.addChild(root_0, DOUBLE48_tree);


                    }
                    break;
                case 3 :
                    // D:\\project\\Amuthu\\Amuthu.g:91:9: BOOLEAN
                    {
                    root_0 = (CommonTree)adaptor.nil();

                    BOOLEAN49=(Token)match(input,BOOLEAN,FOLLOW_BOOLEAN_in_literal693); 
                    BOOLEAN49_tree = (CommonTree)adaptor.create(BOOLEAN49);
                    adaptor.addChild(root_0, BOOLEAN49_tree);


                    }
                    break;
                case 4 :
                    // D:\\project\\Amuthu\\Amuthu.g:92:9: QUOTE
                    {
                    root_0 = (CommonTree)adaptor.nil();

                    QUOTE50=(Token)match(input,QUOTE,FOLLOW_QUOTE_in_literal703); 
                    QUOTE50_tree = (CommonTree)adaptor.create(QUOTE50);
                    adaptor.addChild(root_0, QUOTE50_tree);


                    }
                    break;
                case 5 :
                    // D:\\project\\Amuthu\\Amuthu.g:93:9: function
                    {
                    root_0 = (CommonTree)adaptor.nil();

                    pushFollow(FOLLOW_function_in_literal713);
                    function51=function();

                    state._fsp--;

                    adaptor.addChild(root_0, function51.getTree());

                    }
                    break;

            }
            retval.stop = input.LT(-1);

            retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);
            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
    	retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);

        }
        finally {
        }
        return retval;
    }
    // $ANTLR end "literal"

    public static class function_return extends ParserRuleReturnScope {
        CommonTree tree;
        public Object getTree() { return tree; }
    };

    // $ANTLR start "function"
    // D:\\project\\Amuthu\\Amuthu.g:96:1: function : IDENTIFIER LPAREN ( expression ( COMMA expression )* )? RPAREN -> ^( IDENTIFIER ( expression )* ) ;
    public final AmuthuParser.function_return function() throws RecognitionException {
        AmuthuParser.function_return retval = new AmuthuParser.function_return();
        retval.start = input.LT(1);

        CommonTree root_0 = null;

        Token IDENTIFIER52=null;
        Token LPAREN53=null;
        Token COMMA55=null;
        Token RPAREN57=null;
        AmuthuParser.expression_return expression54 = null;

        AmuthuParser.expression_return expression56 = null;


        CommonTree IDENTIFIER52_tree=null;
        CommonTree LPAREN53_tree=null;
        CommonTree COMMA55_tree=null;
        CommonTree RPAREN57_tree=null;
        RewriteRuleTokenStream stream_RPAREN=new RewriteRuleTokenStream(adaptor,"token RPAREN");
        RewriteRuleTokenStream stream_COMMA=new RewriteRuleTokenStream(adaptor,"token COMMA");
        RewriteRuleTokenStream stream_IDENTIFIER=new RewriteRuleTokenStream(adaptor,"token IDENTIFIER");
        RewriteRuleTokenStream stream_LPAREN=new RewriteRuleTokenStream(adaptor,"token LPAREN");
        RewriteRuleSubtreeStream stream_expression=new RewriteRuleSubtreeStream(adaptor,"rule expression");
        try {
            // D:\\project\\Amuthu\\Amuthu.g:97:2: ( IDENTIFIER LPAREN ( expression ( COMMA expression )* )? RPAREN -> ^( IDENTIFIER ( expression )* ) )
            // D:\\project\\Amuthu\\Amuthu.g:97:4: IDENTIFIER LPAREN ( expression ( COMMA expression )* )? RPAREN
            {
            IDENTIFIER52=(Token)match(input,IDENTIFIER,FOLLOW_IDENTIFIER_in_function732);  
            stream_IDENTIFIER.add(IDENTIFIER52);

            LPAREN53=(Token)match(input,LPAREN,FOLLOW_LPAREN_in_function734);  
            stream_LPAREN.add(LPAREN53);

            // D:\\project\\Amuthu\\Amuthu.g:97:22: ( expression ( COMMA expression )* )?
            int alt17=2;
            int LA17_0 = input.LA(1);

            if ( (LA17_0==LPAREN||(LA17_0>=PLUS && LA17_0<=MINUS)||(LA17_0>=NOT && LA17_0<=IDENTIFIER)) ) {
                alt17=1;
            }
            switch (alt17) {
                case 1 :
                    // D:\\project\\Amuthu\\Amuthu.g:97:24: expression ( COMMA expression )*
                    {
                    pushFollow(FOLLOW_expression_in_function738);
                    expression54=expression();

                    state._fsp--;

                    stream_expression.add(expression54.getTree());
                    // D:\\project\\Amuthu\\Amuthu.g:97:35: ( COMMA expression )*
                    loop16:
                    do {
                        int alt16=2;
                        int LA16_0 = input.LA(1);

                        if ( (LA16_0==COMMA) ) {
                            alt16=1;
                        }


                        switch (alt16) {
                    	case 1 :
                    	    // D:\\project\\Amuthu\\Amuthu.g:97:36: COMMA expression
                    	    {
                    	    COMMA55=(Token)match(input,COMMA,FOLLOW_COMMA_in_function741);  
                    	    stream_COMMA.add(COMMA55);

                    	    pushFollow(FOLLOW_expression_in_function743);
                    	    expression56=expression();

                    	    state._fsp--;

                    	    stream_expression.add(expression56.getTree());

                    	    }
                    	    break;

                    	default :
                    	    break loop16;
                        }
                    } while (true);


                    }
                    break;

            }

            RPAREN57=(Token)match(input,RPAREN,FOLLOW_RPAREN_in_function750);  
            stream_RPAREN.add(RPAREN57);



            // AST REWRITE
            // elements: expression, IDENTIFIER
            // token labels: 
            // rule labels: retval
            // token list labels: 
            // rule list labels: 
            // wildcard labels: 
            retval.tree = root_0;
            RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.tree:null);

            root_0 = (CommonTree)adaptor.nil();
            // 97:65: -> ^( IDENTIFIER ( expression )* )
            {
                // D:\\project\\Amuthu\\Amuthu.g:97:68: ^( IDENTIFIER ( expression )* )
                {
                CommonTree root_1 = (CommonTree)adaptor.nil();
                root_1 = (CommonTree)adaptor.becomeRoot(stream_IDENTIFIER.nextNode(), root_1);

                // D:\\project\\Amuthu\\Amuthu.g:97:81: ( expression )*
                while ( stream_expression.hasNext() ) {
                    adaptor.addChild(root_1, stream_expression.nextTree());

                }
                stream_expression.reset();

                adaptor.addChild(root_0, root_1);
                }

            }

            retval.tree = root_0;
            }

            retval.stop = input.LT(-1);

            retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);
            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
    	retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);

        }
        finally {
        }
        return retval;
    }
    // $ANTLR end "function"

    // Delegated rules


 

    public static final BitSet FOLLOW_conditionalExpr_in_expression60 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_LPAREN_in_parenthesisedExpr78 = new BitSet(new long[]{0x000000000FC30020L});
    public static final BitSet FOLLOW_expression_in_parenthesisedExpr81 = new BitSet(new long[]{0x0000000000000040L});
    public static final BitSet FOLLOW_RPAREN_in_parenthesisedExpr83 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_logicalOrExpr_in_conditionalExpr100 = new BitSet(new long[]{0x0000000000000082L});
    public static final BitSet FOLLOW_QUESTION_in_conditionalExpr103 = new BitSet(new long[]{0x000000000FC30020L});
    public static final BitSet FOLLOW_expression_in_conditionalExpr106 = new BitSet(new long[]{0x0000000080000000L});
    public static final BitSet FOLLOW_31_in_conditionalExpr108 = new BitSet(new long[]{0x000000000FC30020L});
    public static final BitSet FOLLOW_conditionalExpr_in_conditionalExpr111 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_logicalAndExpr_in_logicalOrExpr124 = new BitSet(new long[]{0x0000000000000102L});
    public static final BitSet FOLLOW_OR_in_logicalOrExpr127 = new BitSet(new long[]{0x000000000FC30020L});
    public static final BitSet FOLLOW_logicalAndExpr_in_logicalOrExpr130 = new BitSet(new long[]{0x0000000000000102L});
    public static final BitSet FOLLOW_equalityExpr_in_logicalAndExpr142 = new BitSet(new long[]{0x0000000000000202L});
    public static final BitSet FOLLOW_AND_in_logicalAndExpr145 = new BitSet(new long[]{0x000000000FC30020L});
    public static final BitSet FOLLOW_equalityExpr_in_logicalAndExpr148 = new BitSet(new long[]{0x0000000000000202L});
    public static final BitSet FOLLOW_relationalExpr_in_equalityExpr160 = new BitSet(new long[]{0x0000000000000C02L});
    public static final BitSet FOLLOW_EQUALS_in_equalityExpr165 = new BitSet(new long[]{0x000000000FC30020L});
    public static final BitSet FOLLOW_NOT_EQUALS_in_equalityExpr170 = new BitSet(new long[]{0x000000000FC30020L});
    public static final BitSet FOLLOW_relationalExpr_in_equalityExpr175 = new BitSet(new long[]{0x0000000000000C02L});
    public static final BitSet FOLLOW_additiveExpr_in_relationalExpr193 = new BitSet(new long[]{0x000000000000F002L});
    public static final BitSet FOLLOW_LESSTHAN_EQ_in_relationalExpr212 = new BitSet(new long[]{0x000000000FC30020L});
    public static final BitSet FOLLOW_GREATERTHAN_EQ_in_relationalExpr231 = new BitSet(new long[]{0x000000000FC30020L});
    public static final BitSet FOLLOW_LESSTHAN_in_relationalExpr250 = new BitSet(new long[]{0x000000000FC30020L});
    public static final BitSet FOLLOW_GREATERTHAN_in_relationalExpr269 = new BitSet(new long[]{0x000000000FC30020L});
    public static final BitSet FOLLOW_additiveExpr_in_relationalExpr298 = new BitSet(new long[]{0x000000000000F002L});
    public static final BitSet FOLLOW_multiplicativeExpr_in_additiveExpr329 = new BitSet(new long[]{0x0000000000030002L});
    public static final BitSet FOLLOW_PLUS_in_additiveExpr347 = new BitSet(new long[]{0x000000000FC30020L});
    public static final BitSet FOLLOW_MINUS_in_additiveExpr366 = new BitSet(new long[]{0x000000000FC30020L});
    public static final BitSet FOLLOW_multiplicativeExpr_in_additiveExpr395 = new BitSet(new long[]{0x0000000000030002L});
    public static final BitSet FOLLOW_powerExpr_in_multiplicativeExpr425 = new BitSet(new long[]{0x00000000001C0002L});
    public static final BitSet FOLLOW_MULTIPLY_in_multiplicativeExpr444 = new BitSet(new long[]{0x000000000FC30020L});
    public static final BitSet FOLLOW_DIVIDE_in_multiplicativeExpr463 = new BitSet(new long[]{0x000000000FC30020L});
    public static final BitSet FOLLOW_MODULO_in_multiplicativeExpr482 = new BitSet(new long[]{0x000000000FC30020L});
    public static final BitSet FOLLOW_powerExpr_in_multiplicativeExpr511 = new BitSet(new long[]{0x00000000001C0002L});
    public static final BitSet FOLLOW_unaryExpr_in_powerExpr536 = new BitSet(new long[]{0x0000000000200002L});
    public static final BitSet FOLLOW_POWER_in_powerExpr540 = new BitSet(new long[]{0x000000000FC30020L});
    public static final BitSet FOLLOW_unaryExpr_in_powerExpr543 = new BitSet(new long[]{0x0000000000200002L});
    public static final BitSet FOLLOW_PLUS_in_unaryExpr562 = new BitSet(new long[]{0x000000000FC30020L});
    public static final BitSet FOLLOW_unaryExpr_in_unaryExpr564 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_MINUS_in_unaryExpr579 = new BitSet(new long[]{0x000000000FC30020L});
    public static final BitSet FOLLOW_unaryExpr_in_unaryExpr581 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_NOT_in_unaryExpr599 = new BitSet(new long[]{0x000000000FC30020L});
    public static final BitSet FOLLOW_unaryExpr_in_unaryExpr601 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_primaryExpr_in_unaryExpr620 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_parenthesisedExpr_in_primaryExpr639 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_literal_in_primaryExpr649 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_INTEGER_in_literal673 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_DOUBLE_in_literal683 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_BOOLEAN_in_literal693 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_QUOTE_in_literal703 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_function_in_literal713 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_IDENTIFIER_in_function732 = new BitSet(new long[]{0x0000000000000020L});
    public static final BitSet FOLLOW_LPAREN_in_function734 = new BitSet(new long[]{0x000000000FC30060L});
    public static final BitSet FOLLOW_expression_in_function738 = new BitSet(new long[]{0x0000000010000040L});
    public static final BitSet FOLLOW_COMMA_in_function741 = new BitSet(new long[]{0x000000000FC30020L});
    public static final BitSet FOLLOW_expression_in_function743 = new BitSet(new long[]{0x0000000010000040L});
    public static final BitSet FOLLOW_RPAREN_in_function750 = new BitSet(new long[]{0x0000000000000002L});

}